package com.hs.srm.admin.modules.cutpay.service.impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.hs.srm.admin.modules.cutpay.dao.CutpayItemDao;
import com.hs.srm.admin.modules.cutpay.entity.CutpayItemEntity;
import com.hs.srm.admin.modules.cutpay.service.CutpayItemService;
import com.hs.srm.base.common.utils.QueryParam;
import com.hs.srm.common.utils.PageUtils;

/**
 * 扣款单行项目Service控制层实现类
 * <p>標題：</p>
 * <p>描述：</p>
 * <p>版權：版權所有 (c) 2019</p>
 * <p>組織：厚声集团</p>
 *
 * @author 鐘曉籟
 * @version V1.0.0
 * @date 2019年4月2日 上午9:46:29
 * @since V1.0.0
 */
@Service("cutpayItemService")
public class CutpayItemServiceImpl extends ServiceImpl<CutpayItemDao, CutpayItemEntity> implements CutpayItemService {

	@Autowired
	private CutpayItemDao cutpayItemDao;
	
	@Override
	public PageUtils selectDetailPage(Map<String, Object> params) {
		Page<CutpayItemEntity> page = this.selectDetailPage(new QueryParam<CutpayItemEntity>(params).getPage(),
				new EntityWrapper<CutpayItemEntity>(), params);
		return new PageUtils(page);
	}

	private Page<CutpayItemEntity> selectDetailPage(Page<CutpayItemEntity> page, Wrapper<CutpayItemEntity> wrapper,
			Map<String, Object> params) {
		page.setRecords(this.cutpayItemDao.selectDetailPage(page, wrapper, params));
		return page;
	}

}
